﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WordNet.Core;
using WordNet.Core.DataContract;
using WordNet.Core.ElementContracts;

namespace WordNet.CoreTests.Parsers
{
    [TestClass]
    public class UnitTestExceptionLine:UnitTestBase
    {
        const string EXCEPTION_LINE = "amnestied amnesty";
        [ClassInitialize]
        public static void ClassInit(TestContext context)
        {
            Container = MEFLoader.Load();
        }

        [TestMethod]
        public void CanParseExceptionLine()
        {
            var parser = Container.GetExportedValue<IParser<IExceptionEntryProxy>>();
            IExceptionEntryProxy entry = parser.Parse(EXCEPTION_LINE);
            Assert.AreEqual("amnesty", entry.GetRootForms()[0]);
            Assert.AreEqual("amnestied", entry.SurfaceForm);
        }
    }
}
